/*
 * Copyright 2007 Robert Hanson <iamroberthanson AT gmail.com>
 * Copyright 2009 Matias Kruk <kruk.matias AT gmail.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.gwtsandbox.gears.orm.client;

import java.util.Date;

/**
 * @gears.table (name=Requests, namespace=mydatabase)
 * @gears.index (name= titleStatus, fields= shorttitle_status)
 * @gears.namedQuery (name=findByShortTitle, sql="select :Requests where shortTitle = ?")
 */
public class Request implements GearsDataObject
{
    public static final String FIND_BY_SHORT_TITLE = "findByShortTitle";
    private Long id;
    private String title;
    private String status;    
    private Long idObject;
    
    /**
     * @gears.column
     */
    private Date lastUpdated;
    
    /**
     * @gears.column
     */
    private byte testData;

    /**
     * @gears.column (length=10, scale=2)
     */
    private double starDate;


    

    public double getStarDate ()
    {
        return starDate;
    }

    public void setStarDate (double starDate)
    {
        this.starDate = starDate;
    }

    public Date getLastUpdated ()
    {
        return lastUpdated;
    }

    public void setLastUpdated (Date lastUpdated)
    {
        this.lastUpdated = lastUpdated;
    }

    /**
     * @gears.id (length=10)
     */
    public Long getRequestId ()
    {
        return id;
    }
    public void setRequestId (Long requestId)
    {
        this.id = requestId;
    }

    /**
     * @gears.column (length=300)
     */
    public String getShortTitle ()
    {
        return title;
    }
    public void setShortTitle (String shortTitle)
    {
        this.title = shortTitle;
    }

    public String getStatus ()
    {
        return status;
    }
    /**
     * @gears.column (length=20)
     */
    public void setStatus (String ststus)
    {
        this.status = ststus;
    }

    /**
     * column data marked on field
     */
    public byte getTestData ()
    {
        return testData;
    }
    public void setTestData (byte testData)
    {
        this.testData = testData;
    }

    /**
     * @gears.column (references=Objeto(RequestId))
     */
	public void setIdObject(Long idObject) {
		this.idObject = idObject;
	}
	public Long getIdObject() {
		return idObject;
	}
}
